<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>第三事业部订餐系统</title>
    <meta name="description" content="Flat UI Kit Free is a Twitter Bootstrap Framework design and Theme, this responsive framework includes a PSD and HTML version."/>

    <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">

    <!-- Loading Bootstrap -->
    <link href="__PUBLIC__/index/bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Loading Flat UI -->
    <link href="__PUBLIC__/index/css/flat-ui.css" rel="stylesheet">

    <script src="__PUBLIC__/index/js/Chart.js" rel="stylesheet"></script>


    <link rel="shortcut icon" href="__PUBLIC__/index/images/icons/png/meal.png">

    <style type="text/css">
      body {
        padding-top: 70px;
      }
      </style>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <!-- Fixed navbar -->
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">点餐系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="{:U('Index/index')}">首页</a></li>
            <foreach item="nav" name="nav">
              <li><a href="{:U('Index/order')}?id={$nav.id}">{$nav.name}</a></li>
            </foreach>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="{:U('Index/about')}">关于</a></li>
            <li><a href="{:U('Index/check')}">所有人的订单</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{$userName}'s 个人中心<span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="{:U('Index/history')}">历史记录</a></li>
                <li><a href="{:U('Index/myorder')}">我的订单</a></li>
<!--                 <li><a href="#">Something else here</a></li> -->
                <li role="separator" class="divider"></li>
<!--                 <li class="dropdown-header">Nav header</li>
                <li><a href="#">Separated link</a></li> -->
                <li><a href="{:U('Login/logoutHandle')}">退出登录</a></li>
              </ul>
            </li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">

      <!-- Main component for a primary marketing message or call to action -->
      <div class="jumbotron" style="padding:12px;text-align:center;margin:0px;">
        <h5>首页</h5>
      </div>

    </div> <!-- /container -->
    <div class="container" style="margin-top:20px;">
        <div style="width: 100%; margin:0 auto;">
          <canvas id="canvas" height="45%" width="100%"></canvas>
        </div>
    </div>
    <script>
   var randomScalingFactor = function(){ return Math.round(Math.random()*100)};

  var barChartData = {

    labels : [
    <foreach item="v1" name="order">
      "{$v1.name}",
    </foreach>
    ],

    datasets : [
      {
        fillColor : "rgba(26,188,156,0.5)",
        strokeColor : "rgba(26,188,156,0.8)",
        highlightFill: "rgba(26,188,156,0.75)",
        highlightStroke: "rgba(26,188,156,1)",
        data : [<foreach item="v2" name="order">
          {$v2.sum},
        </foreach>]
      }
    ]

  }
  window.onload = function(){
    var ctx = document.getElementById("canvas").getContext("2d");
    window.myBar = new Chart(ctx).Bar(barChartData, {
      responsive : true
    });
  }

  </script>
    
    <!-- Load JS here for greater good =============================-->
    <script src="__PUBLIC__/index/js/jquery-1.8.3.min.js"></script>
    <script src="__PUBLIC__/index/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="__PUBLIC__/index/js/jquery.ui.touch-punch.min.js"></script>
    <script src="__PUBLIC__/index/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/index/js/bootstrap-select.js"></script>
    <script src="__PUBLIC__/index/js/bootstrap-switch.js"></script>
    <script src="__PUBLIC__/index/js/flatui-checkbox.js"></script>
    <script src="__PUBLIC__/index/js/flatui-radio.js"></script>
    <script src="__PUBLIC__/index/js/jquery.tagsinput.js"></script>
    <script src="__PUBLIC__/index/js/jquery.placeholder.js"></script>
    <script src="__PUBLIC__/index/js/jquery.stacktable.js"></script>
    <script src="http://vjs.zencdn.net/4.3/video.js"></script>
    <script src="__PUBLIC__/index/js/application.js"></script>
  </body>
</html>
